-
-
Notifications
You must be signed in to change notification settings - Fork 421
minfo.d is no longer throwing Errors #2795
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + druntime#2795" |
I have no idea where that is coming from :-( |
@thewilsonator thanks! |
@@ -368,7 +368,8 @@ struct ModuleGroup | |||
|
|||
string errmsg = ""; | |||
buildCycleMessage(idx, midx, (string x) {errmsg ~= x;}); | |||
throw new Error(errmsg, __FILE__, __LINE__); | |||
assert(0, errmsg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right though ? That's an user-facing message, not a programming error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The assert gives a user-facing message. Besides, being unable to run the constructors is a programming error.
buildkite fails with the completely unhelpful:
|
The autotester logs show no failures, but list the tests as failing. |
It does, but since the tests are run in parallel, the output is intertwined.
Test is checking for a specific return code, and I believe it changes from 1 to 4 with the switch to assert. See Line 13 in 3ead62a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does assert(0) print a proper message in release mode? It's critical that this doesn't just exit with a signal. Remeber that druntime is compiled in release mode.
If you want to print messages and then assert(0), that's OK, but these have to produce messages, or nobody will know what is going on.
Testing on run.dlang.io, assert(0, "message")
does not print anything in release mode.
assert() is better.